package com.object;

import com.activity.MyMapActivity;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import maps.test.R;

public class MyAdapter extends ArrayAdapter<String> {

	public MyAdapter(Context context, int textViewResourceId, String[] objects) {
		super(context, textViewResourceId, objects);
	}

	@Override
	public View getDropDownView(int position, View convertView, ViewGroup parent) {
		return getCustomView(position, convertView, parent);
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		return getCustomView(position, convertView, parent);
	}

	public View getCustomView(int position, View convertView, ViewGroup parent) {

		LayoutInflater inflater = ((Activity) MyMapActivity.getmContext())
				.getLayoutInflater();
		View row = inflater.inflate(R.layout.row, parent, false);
		// TextView label=(TextView)row.findViewById(R.id.company);
		// label.setText(strings[position]);
		//	 
		// TextView sub=(TextView)row.findViewById(R.id.sub);
		// sub.setText(subs[position]);
		//	 
		// ImageView icon=(ImageView)row.findViewById(R.id.image);
		// icon.setImageResource(arr_images[position]);

		return row;
	}
}
